//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.example.mapper;

import com.example.entity.Recruitmentapplication;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RecruitmentapplicationMapper {
    List<Recruitmentapplication> selectAll(Recruitmentapplication recruitmentapplication);

    @Select({"select * from recruitmentapplication where id = #{id}"})
    Recruitmentapplication selectById(Integer id);

    @Insert({"insert into recruitmentapplication (recruitment_id,student_id,president_id,application_time,status,feedback) values (#{recruitmentId},#{studentId},#{presidentId},#{applicationTime},#{status},#{feedback})"})
    int insert(Recruitmentapplication recruitmentapplication);

    @Update({"update recruitmentapplication set recruitment_id = #{recruitmentId}, student_id = #{studentId},president_id = #{presidentId},application_time = #{applicationTime},status = #{status},feedback = #{feedback} where id=#{id}"})
    int updateById(Recruitmentapplication recruitmentapplication);

    @Delete({"delete from recruitmentapplication where id = #{id}"})
    int deleteById(Integer id);

    @Delete("delete from recruitmentapplication where recruitment_id = #{id}")
    void deleteByRecruitmentId(Integer id);


    List<Recruitmentapplication> selectByRecruitmetId(Integer recruitmentId);
}
